package hu.diploma.web.client.panels;

import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.google.gwt.user.client.ui.Widget;

public class CenterPanel extends ContentPanel {

	private static CenterPanel instanse;

	private CenterPanel() {

	}

	public static CenterPanel getWidget() {
		if (instanse == null) {
			instanse = new CenterPanel();
			instanse.setScrollMode(Scroll.AUTO);
			instanse.setFrame(true);
		}

		return instanse;

	}

	public void setWidget(Widget widget) {
		this.removeAll();
		this.add(widget);
		doLayout();
	}
}
